<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="renderer" content="webkit|ie-comp|ie-stand">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <title>入库</title>
</head>

<body>
  <div id="app">
    <div class="warehouse-in">
      <el-tabs v-model="activeMenu" class="full-tabs">
        <el-tab-pane lazy v-for="menu in menus" :key="menu.name" :label="menu.label" :name="menu.name">
          <component :is="menu.url" class="menu-item" :unit-list="unitList"></component>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</body>

<script src="https://upload.shinehao.com.cn/20181222140744qiniu.min.js"></script>
<script src="../../myJs/importFile.js"></script>
<script>
  importFile([
    "/vueSystem/components/css/sysCommonSearch.css",
    "/vueSystem/components/css/searchBtnView.css",
    "/vueSystem/components/css/imgUpload.css",
    "./css/mergePurchase.css",
    "./css/purchaseWarehouseIn.css",
    "./css/nonPurchaseWarehouseIn.css",
    "/purchaseOrder/companyMaterialTable/css/companyMaterialForm.css",
  ], [
    "/vueSystem/i18n/index.js",
    "/vueSystem/js/checkVaildUtil.js",
    "/vueSystem/js/storageUtil.js",
    "/vueSystem/js/permissionUtil.js",
    "/vueSystem/components/sysCommonSearch.js",
    "/vueSystem/components/searchBtnView.js",
    "/vueSystem/components/tableSelect.js",
    "/vueSystem/components/filterSelect.js",
    "/vueSystem/models/baseModel.js",
    "/purchaseOrder/models/customerModel.js",
    "/purchaseOrder/models/companyMaterialTableModel.js",
    "/vueSystem/components/imgUpload.js",
    "/vueSystem/components/sysAutocomplete.js",
    "/vueSystem/mixins/tablePaginationMixin.js",
    "/vueSystem/mixins/datePickerOptionsMixin.js",
    "/purchaseOrder/customer/customerForm.js",
    "/purchaseOrder/companyMaterialTable/companyMaterialForm.js"
  ]);
  importTableColShowConfigFiles();
</script>

<script src="./mergePurchase.js"></script>
<script src="./purchaseWarehouseInUnit.js"></script>
<script src="./purchaseWarehouseIn.js"></script>
<script src="./nonPurchaseWarehouseIn.js"></script>
<script>
  var app = new Vue({
    el: '#app',
    data: function () {
      return {
        activeMenu: 'purchaseWarehouseIn',
        menus: [{
          label: "采购单入库",
          name: "purchaseWarehouseIn",
          url: "purchase-warehouse-in"
        }, {
          label: "无采购单入库",
          name: "nonPurchaseWarehouseIn",
          url: "non-purchase-warehouse-in"
        }],
        unitList: []
      };
    },
    created: function () {
      this.setUnitList();
    },
    methods: {
      //设置单位
      setUnitList: function () {
        var self = this;
        ajaxRequest("basicData/getCompanyUnit").then(function (res) {
          self.unitList = res;
        }).catch(function (error) {
          console.log(error);
        });
      },
    },
    components: {
      PurchaseWarehouseIn: PurchaseWarehouseIn,
      NonPurchaseWarehouseIn: NonPurchaseWarehouseIn
    }
  });

</script>
<style>
  .warehouse-in {
    padding-left: 20px;
    height: 100%;
  }

</style>

</html>
